#ifndef INET_SOCKET_ACCEPTOR_H
#define INET_SOCKET_ACCEPTOR_H

#include "SocketStream.h"
#include "Socket.h"
#include "InetAddress.h"

#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>
#include <unistd.h>
#include <iostream>

class SocketAcceptor
{
 public:
  SocketAcceptor(InetAddress &addr);
  ~SocketAcceptor();

  void open (const InetAddress &sock);
  void accept(SocketStream &ss);
  Socket getHandle() const;

 private:
  Socket handle_;
  bool debug_;
};

#endif
